<template>
  <div class="app">
    <h4>父组件 -- <button @click="clickMe">获取组件实例</button></h4>
    <!-- 1. 绑定ref属性 -->
    <BaseForm ref="baseFormRef"></BaseForm>
  </div>
</template>

<script>
import BaseForm from './components/BaseForm.vue'
export default {
  components: {
    BaseForm,
  },
  methods: {
    clickMe(){
      // console.log(this.$refs.baseFormRef.username)
      // this.$refs.baseFormRef.username = 'zhangsan'
      this.$refs.baseFormRef.getFormData()
    }
  }
}
</script>

<style>
</style>